<?php if (!defined('HKCMS_VERSION')) exit(); ?>
{hkcms:admintemplate file="common/Head"}
<style>
    .showul {
        cursor: pointer;
    }
    .sonul {
        position: absolute;
        display: none;
        z-index: 99;
        width: 100%;
    }
    .sonul li {
        background-color: #ffffff;
        padding: 4px;
    }
    .sonul li a {
        display: block;
    }
    .sonul li:hover {
        background-color: #e6e6e6;
    }
</style>
<body>
<div class="wrap J_check_wrap" id="loadhtml">
    {hkcms:admintemplate file="common/Nav"}
  <div class="h_a">说明</div>
  <div class="prompt_text">
    <ul>
      <li>模版管理！</li>
      <li>官网地址：<font color="#FF0000">http://www.hkcms.cn</font>，<a href="http://www.hkcms.cn" target="_blank">立即前往</a>！</li>
    </ul>
  </div>
  <div class="h_a">分类</div>
  <ul id="catList" class="cc" style="line-height: 30px">
    <li style="float:left;padding-left:10px;"><a href="{:url('index')}" {if ($catid=='template')} style="color: #333333"{/if}>全部</a></li>
    <div class="loading" id="fenlei">loading...</div>
  </ul>
  <div class="h_a">搜索</div>
  <div class="search_type  mb10">
    <form action="{:url('index')}" method="post">
      <div class="mb10">
        <div class="mb10"> <span class="mr20"> 模版名称：
          <input type="text" class="input length_2" name="keyword" style="width:200px;" value="{$keyword}" placeholder="请输入关键字...">
                <input type="hidden" name="catid" value="{$catid}">
          <input type="submit" value="搜索" class="btn" />
          </span> </div>
      </div>
    </form>
  </div>
  <div class="loading" id="nlist">loading...</div>
</div>
<script src="{$config_siteurl}statics/js/common.js"></script>
<script>
$(function(){
    $.get('{:url("catList",["catid"=>$catid])}',{r:Math.random()},function(category){
      $('#catList').append(category);
      $('#nlist').hide();
    });
    $.get('{:url("index")}',{catid: '{$catid}',page:'{$page}',keyword:'{$keyword}',r:Math.random() },function(data){
        $('#loadhtml').append(data);
        $('#fenlei').hide();
    });
    $(document).on('click','.showul',function (e) {
        $(this).parent().find('.sonul').toggle();
    });
});

</script>
</body>
</html>